package cn.tide.question2.question;

/**
 * 第6题递归调用
 */
public class question6 {

    public static int recursion(int n){

        if (n==1||n==0)
            return 1;
        else
            return n*recursion(n-1);
    }

    public static void main(String[] args) {
        int n = 5;
        int recursion = recursion(n);

        System.out.println(n+"的阶乘为："+recursion);
    }
}
